//
//  WYCAboutMeController.m
//  51信用卡
//
//  Created by 中企互联 on 2017/11/2.
//  Copyright © 2017年 中企互联. All rights reserved.
//

#import "WYCAboutMeController.h"

@interface WYCAboutMeController ()

@end

@implementation WYCAboutMeController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //setNav
    [self setupNav];
    
    
    //创建界面
    [self setupCreat];
}
- (void)setupCreat{
    
    
    
    CGFloat tableviewY = CGRectGetMaxY(self.navigationController.navigationBar.frame);
    
    UIImageView * logoimageView = [[UIImageView alloc] init];
    logoimageView.frame = CGRectMake(ScreenWidth / 2 - 200 * px, tableviewY + 300* px, 400 * px, 400 * px);
    logoimageView.image = [UIImage imageNamed:@"kuaifulogo"];
    logoimageView.backgroundColor =  WYCGlobalBg;
    [self.view addSubview:logoimageView];
    
    UILabel * comenttitle = [[UILabel alloc] init];
    comenttitle.frame = CGRectMake(40 * px, CGRectGetMaxY(logoimageView.frame) + 300 * px, ScreenWidth - 80 * px, 200 * px);
    comenttitle.text = @"快付钱包";
    comenttitle.textAlignment = NSTextAlignmentCenter;
    comenttitle.font = MiddleLight;
    comenttitle.numberOfLines = 0;
    [self.view addSubview:comenttitle];
    
    
    
    
}
#pragma make ------->>nav界面修改
- (void)setupNav{
    
    self.view.backgroundColor = WYCGlobalBg;
    self.navigationItem.title = @"关于我们";
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    [self.navigationController.navigationBar setBarTintColor:WYCMain];
    
}
- (void)viewWillAppear:(BOOL)animated {
    
    [super viewWillAppear:animated];
    
    
    
    self.navigationController.navigationBar.hidden = YES;
    
    
    UIView * NavView = [[UIView alloc] init];
    NavView.frame = CGRectMake(0, 0, ScreenWidth, NavHeight);
    NavView.backgroundColor = WYCmainColor;
    [self.view addSubview:NavView];
    
    
    
    CALayer *bottomLineLayer = [[CALayer alloc] init];
    bottomLineLayer.frame = CGRectMake(0, NavView.bounds.size.height - 0.5, NavView.bounds.size.width, 0.5);
    bottomLineLayer.backgroundColor = WYCmainColor.CGColor;
    [NavView.layer addSublayer:bottomLineLayer];
    
    
    
    
    
    //返回按钮
    UIButton *  fanhuibutton = [[UIButton alloc] init];
    [fanhuibutton setImage:[UIImage imageNamed:@"Nav_back"] forState:UIControlStateNormal];
    [fanhuibutton addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
    fanhuibutton.frame = CGRectMake(30 * px, titleY, 66 * px , 66 * px);
    [NavView addSubview:fanhuibutton];
    
    
    UILabel * NavRigsterLabel = [[UILabel alloc] init];
    NavRigsterLabel.frame = CGRectMake(0, titleY, NavView.width, 68 * px);
    NavRigsterLabel.textColor = [UIColor whiteColor];
    NavRigsterLabel.font = [UIFont boldSystemFontOfSize:BigFont];
    NavRigsterLabel.textAlignment = NSTextAlignmentCenter;
    NavRigsterLabel.text = @"关于我们";
    [NavView addSubview:NavRigsterLabel];
}
- (void)backClick{
    
    [self.navigationController popViewControllerAnimated:YES];
}
@end
